package cn.zwx.infra.svc.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.URL;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @author zhangwenxue
 */
@Data
@ApiModel("创建渠道入参")
public class SmsChannelSaveDTO {

    @ApiModelProperty( value = "短信签名",required = true, example = "XueXue")
    @NotBlank(message = "短信签名不能为空")
    private String signature;

    @ApiModelProperty( value = "渠道编码，参见 SmsChannelEnum 枚举类",required = true, example = "YUN_PIAN")
    @NotNull(message = "渠道编码不能为空")
    private String code;

    @ApiModelProperty( value = "启用状态",required = true, example = "1")
    @NotNull(message = "启用状态不能为空")
    private Integer status;

    @ApiModelProperty( value = "备注", example = "好吃！")
    private String remark;

    @ApiModelProperty( value = "短信 API 的账号",required = true,example = "zwx")
    @NotNull(message = "短信 API 的账号不能为空")
    private String apiKey;

    @NotNull(message = "短信 API 的密钥不能为空")
    @ApiModelProperty(value = "短信 API 的密钥",required = true, example = "yuanma")
    private String apiSecret;

    @ApiModelProperty( value = "短信发送回调 URL", example = "http://www.iocoder.cn")
    @URL(message = "回调 URL 格式不正确")
    private String callbackUrl;

    @ApiModelProperty(name = "创建人",required = true)
    @NotNull(message = "创建人不能为空")
    private Long userId;
}
